<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
	<head>
		<%@ include file="/WEB-INF/jsp/inc/taglibs.jsp"%>
		<%@ include file="/WEB-INF/jsp/inc/meta.jsp"%>
	</head>
	<body style="background: #E8F5FE; padding: 15px 18px;" class="scroll_r">
				
		<div id="right_w">
			<p>
				当前位置：报建管理
			</p>
		</div>
		<form name="applyForm" action="${approot}/admin/apply/apply_list/form/0" method="post">
		<table border="0" cellpadding="0" cellspacing="1" width="92%" align="center" id="add_tab">	
		<tr><td>		
			<input type="button" value="待办" onclick="location.href='${approot}/admin/apply/apply_list/form/0?viewType=0'" <c:if test="${viewType == 0 || viewType == null}">disabled style="border:1px solid red"</c:if>  />
			<input type="button" value="已办" onclick="location.href='${approot}/admin/apply/apply_list/form/0?viewType=1'" <c:if test="${viewType == 1 }">disabled style="border:1px solid red"</c:if> />
			<input type="button" value="已完结" onclick="location.href='${approot}/admin/apply/apply_list/form/0?viewType=2'" <c:if test="${viewType == 2 }">disabled style="border:1px solid red"</c:if> />
		</td></tr>
		</table>
		<table border="0" cellpadding="0" cellspacing="1" width="92%" align="center" id="add_tab">	
			<tr>
				<td>
					申请人：<input name="customName" value="${applyBean.customName}"/>&nbsp;<input type="hidden" name="viewType" value="${viewType}"/>
					身份证：<input name="cardId" value="${applyBean.cardId}"/>&nbsp;
					区域地址：<input name="address" value="${applyBean.address}"/>&nbsp;<br/>
					申请时间：<input name="shenqingDate"  value="${apply.shenqingDate}" readonly class="Wdate" onFocus="WdatePicker({startDate:'%y-%M-01 00:00:00',dateFmt:'yyyy-MM-dd HH:mm:ss',alwaysUseStartDate:true})"/>&nbsp;
					状态：<select name="status">
						<option value="">不限</option>
						<c:forEach var="flow" items="${flows}">
						<option value="${flow.status}" <c:if test="${applyBean.status == flow.status}">selected</c:if> >${flow.info}</option>
						</c:forEach>
					</select>
					<input type="button" value="查 询" onclick="document.applyForm.submit();">
					<input type="button" value="报装申请" onclick="location.href='${approot}/admin/apply/apply_to_mod/add/0'">
				</td>
			</tr>
		</table>
		</form>
			<c:choose>
<c:when test="${fn:length(page.items)<1}">
<div align="center"><font color='red'>对不起,暂时没有找到符合条件的数据!</font></div>
</c:when>
<c:otherwise> 
				<table border="0" cellpadding="" cellspacing="1" align="center"
					width="92%" id="web_tab">
					
					<tr>
						<th>
							用户类型
						</th>
						<th>
							申请人
						</th>
						<th>
							联系人
						</th>
						<th>
							身份证号
						</th>
						<th>
							联系电话
						</th>
						<th>
							申请户数
						</th>
						<th>
							付款方式
						</th>
						<th>
							申请时间
						</th>
						<th>
							状态
						</th>
						<th>
							操作
						</th>
					</tr>
				<c:forEach var="apply" items="${page.items}">
					<tr>
						<td>${apply.customTypeView}</td>
						<td>${apply.customName}</td>
						<td>${apply.contacter}</td>
						<td>${apply.cardId}</td>
						<td>${apply.telNo}</td>
						<td>${apply.amount}</td>
						<td>${apply.payTypeView}</td>
						<td>${apply.shenqingDate}</td>
						<td>${apply.statusView}</td>
						<td>
							<a href="${approot}/admin/apply/apply_info/${apply.applyId}">详细</a>
							<c:if test="${apply.changeAble == 1 && apply.processAble == 1 && (viewType == 0 || viewType == null)}">
								<a href="${approot}/admin/apply/apply_to_process/${apply.applyId}">处理</a>
							</c:if>
							<c:if test="${apply.reProcessAble == 1}">
								<a href="${approot}/admin/apply/apply_to_comment/${apply.applyId}">意见填写</a>
							</c:if>
							<c:if test="${apply.editAble == 1 && (viewType == 0 || viewType == null)}">
								<a href="${approot}/admin/apply/apply_to_mod/update/${apply.applyId}">修改</a>
							</c:if>
							<!-- <a>删除</a> -->
							<c:if test="${apply.status == needEquiFlow.status && (viewType == 0 || viewType == null)}">
								<a href="${approot}/admin/apply/to_register_equi/${apply.applyId}">设备登记</a>
							</c:if>
						</td>
					</tr>
				</c:forEach>
					
					
				</table>

				<table border="0" cellpadding="0" cellspacing="1" width="92%"
					align="center">
					<tr>
						<td align="left">
							共有
							<font color='red'>${page.totalCount}</font> 条记录，当前第
							<font color='red'>${page.currentPage}</font>页，共
							<font color='red'>${page.pageCount}</font>页
						</td>
						<td align="right">
							转到
							<select name="topage" id="topage" onchange="window.location.href='${approot}/admin/apply/apply_list/page/' + this.value">
								<c:forEach var="ind" items="${page.pages}">
									<option value="${(ind-1)*page.pageSize}"
										<c:if test="${ind==page.currentPage}">selected="selected"</c:if>>
										${ind}
									</option>
								</c:forEach>
							</select>
							<button class="but"
								onclick="window.location.href='${approot}/admin/apply/apply_list/page/${page.firstIndex}'">
								首页
							</button>
							<button class="but"
								onclick="window.location.href='${approot}/admin/apply/apply_list/page/${page.previousIndex}'">
								上一页
							</button>
							<c:forEach items="${page.showpages}" var="ind">
								<c:if test="${ind!=0}">
									<a
										href="${approot}/admin/apply/apply_list/page/${(ind-1)*page.pageSize}">${ind}</a>
								</c:if>
							</c:forEach>
							<button class="but"
								onclick="window.location.href='${approot}/admin/apply/apply_list/page/${page.nextIndex}'">
								下一页
							</button>
							<button class="but"
								onclick="window.location.href='${approot}/admin/apply/apply_list/page/${page.lastIndex}'">
								末页
							</button>

						</td>
					</tr>
				</table></c:otherwise>
</c:choose>
	</body>
</html>
